import { makeAutoObservable } from 'mobx'

export default class User {
    constructor() {
        makeAutoObservable(this)
    }
    /**
     * state
     */
    ticket = '1' // 登录凭证ticket

    /**
     * computed
     */
    get isLogin() {
        return !!this.ticket
    }

    /**
     * action
     */
    setTicket(val) {
        this.ticket = val || ''
    }
}